'use strict';

(function ($) {
    $(function () {
        var datascource = {
            'name': '焦会峰',
            'title': '大云配Leader',
            'relationship': '001',
            'children': [
                {
                    'name': '高荣玉', 'title': 'ERP leader', 'relationship': '111',
                    'children': [
                        {'name': '刘婷', 'title': '研发', 'relationship': '110'},
                        {'name': '周伟', 'title': '研发', 'relationship': '110'},
                        {'name': '彭松 ', 'title': '研发', 'relationship': '110'},
                        {'name': '黄栋 ', 'title': '研发', 'relationship': '110'},
                        {'name': '赵乙伟', 'title': '研发', 'relationship': '110'},
                        {'name': '徐蒋军', 'title': '研发', 'relationship': '110'},
                        {'name': '李丽 ', 'title': '研发', 'relationship': '110'},
                        {'name': '章国东 ', 'title': '研发实习', 'relationship': '110'},
                        {'name': '梁冰莹', 'title': '前端', 'relationship': '110'},
                        {'name': '徐斌', 'title': '前端', 'relationship': '110'},
                        {'name': '王静文', 'title': '测试工程师', 'relationship': '110'},
                        {'name': '姜慧慧', 'title': '测试工程师', 'relationship': '110'}
                    ]
                },
                {
                    'name': '李赵华', 'title': 'WMS leader', 'relationship': '111',
                    'children': [
                        {'name': '鲍家龙', 'title': '研发', 'relationship': '110'},
                        {'name': '王灿佩', 'title': '研发', 'relationship': '110'},
                        {'name': '徐卫东', 'title': '研发', 'relationship': '110'},
                        {'name': '杨远红', 'title': '研发', 'relationship': '110'},
                        {'name': '杨俊', 'title': '研发', 'relationship': '110'},
                        {'name': '郭延路', 'title': '研发', 'relationship': '110'},
                        {'name': '喻言琦', 'title': '研发', 'relationship': '110'},
                        {'name': '高寒娜', 'title': '研发', 'relationship': '110'},
                        {'name': '张沿', 'title': '研发', 'relationship': '110'},
                        {'name': '高达明*', 'title': '研发', 'relationship': '110'},
                        {'name': '李龙霞', 'title': '测试工程师', 'relationship': '110'}
                    ]
                },
                {
                    'name': '李广学', 'title': '云配 leader', 'relationship': '111',
                    'children': [
                        {'name': '曹利庚', 'title': '研发', 'relationship': '110'},
                        {'name': '何立斌', 'title': '研发', 'relationship': '110'},
                        {'name': '张有生', 'title': '研发', 'relationship': '110'},
                        {'name': '李明', 'title': '研发', 'relationship': '110'},
                        {'name': '颜俊翔', 'title': '研发', 'relationship': '110'},
                        {'name': '林如风', 'title': '研发', 'relationship': '110'},
                        {'name': '鲁健康', 'title': '研发实习', 'relationship': '110'},
                        {'name': '陈奇文', 'title': '前端', 'relationship': '110'},
                        {'name': '栗华', 'title': '测试工程师', 'relationship': '110'},
                        {'name': '吴发德', 'title': '测试工程师', 'relationship': '110'}
                    ]
                },
                {
                    'name': '王志昂', 'title': 'CRM leader', 'relationship': '111',
                    'children': [
                        {'name': '赵康', 'title': '研发', 'relationship': '110'},
                        {'name': '罗彦', 'title': '研发', 'relationship': '110'},
                        {'name': '林君峰', 'title': '研发实习', 'relationship': '110'},
                        {'name': '刘晶2', 'title': '研发实习', 'relationship': '110'},
                        {'name': '徐方胜', 'title': '研发', 'relationship': '110'},
                        {'name': '李安安', 'title': '研发', 'relationship': '110'},
                        {'name': '陈智', 'title': '研发', 'relationship': '110'},
                        {'name': '曹树', 'title': '研发', 'relationship': '110'},
                        {'name': '安小强', 'title': '研发', 'relationship': '110'},
                        {'name': '唐敏', 'title': '前端', 'relationship': '110'},
                        {'name': '成飞', 'title': '前端', 'relationship': '110'},
                        {'name': '雷希', 'title': '前端实习', 'relationship': '110'},
                        {'name': '史来静', 'title': '测试工程师', 'relationship': '110'},
                        {'name': '郑坚', 'title': '测试工程师', 'relationship': '110'},
                        {'name': '黄莲莲', 'title': '测试工程师', 'relationship': '110'}
                    ]
                }
            ]
        };

        $('#chart-container').orgchart({
            'data': datascource,
            'depth': 2,
            'nodeTitle': 'name',
            'nodeContent': 'title'
        });
    });
})(jQuery);